package com.kfg.sql;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.util.Log;
import android.database.sqlite.SQLiteOpenHelper;

public class DBHelper extends SQLiteOpenHelper{
private static final String CREATE="create table dairy(id integer primary key autoincrement,"
		+ "title varchar(20),content varchar(255) not null, time varchar(15) not null,team)";
private static final String CREATE_TEAM="create table team(id integer primary key autoincrement,"
		+ "name varchar(20) not null)";
	public DBHelper(Context context, String name, int version) {
		super(context, name, null, version);
		// TODO Auto-generated constructor stub
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		// TODO Auto-generated method stub
		db.execSQL(CREATE);
		db.execSQL(CREATE_TEAM);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		// TODO Auto-generated method stub
		Log.i("b", db.getVersion()+"");
	}
	
}
